@import "@/styles/fonts";
@import "@/styles/positions";
@import "@/styles/interactive";
@import "@/styles/backgrounds.scss";
@import "@/styles/border.scss";
@import "@/styles/flex.scss";

.widget-select {
  @extend .no-radius;
  $bg-color: rgba(mix(#000, $active, 70%), 0.8) !important;
  input {
    background-color: $bg-color;
    border-color: $--color-primary !important;
    // border-right: none;
    @extend .content;
    @extend .color-white;
  }
}
.widget-search-popper.el-select-dropdown {
  @extend .widget-search-suggestion.el-autocomplete-suggestion;
  .el-scrollbar__view.el-select-dropdown__list {
    .el-select-dropdown__item,
    .el-select-dropdown__item.selected.hover {
      // @extend .color-white;
      // @extend .hover-active-alpha;
    }
    .el-select-dropdown__item.selected.hover {
      // @extend .hover-active-alpha.active;
    }
  }
}
.mytooltip {
  $bg-color: rgba(mix(#000, $active, 70%), 0.8) !important;
  font-size: 16px !important;
  background-color: $bg-color;
}

//覆写input
.widget-search {
  @extend .no-radius;
  $bg-color: rgba(mix(#000, $active, 70%), 0.8) !important;
  input,
  textarea,
  .el-input__inner,
  .el-range-input {
    background-color: rgba(mix(#000, $active, 70%), 0);
    border-color: $--color-info !important;
    // border-right: none;
    @extend .content;
    // @extend .color-white;
  }
  .el-select,
  textarea {
    width: 100%;
    background-color: rgba(mix(#000, $active, 70%), 0);
    border-color: $--color-info !important;
    font-size: 16px;
    // padding: 4px;
    color: $--color-from-text;
    &:focus-visible {
      border-color: $--color-primary !important;
    }
  }
  .el-input-group__append {
    background-color: $bg-color;
    // @extend .color-white;
    border-color: $--color-primary !important;
    border-left: none;
  }
}
.widget-search-suggestion.el-autocomplete-suggestion {
  @extend .black-bg;
  border-color: $--color-primary !important;
  .popper__arrow,
  .popper__arrow::after {
    border-bottom-color: $--color-primary !important;
  }
  .el-scrollbar__view.el-autocomplete-suggestion__list > li {
    @extend .color-white;
    @extend .hover-active-alpha;
  }
}
.top-search {
  @extend .no-radius;
  $bg-color: rgba(mix(#000, $active, 70%), 0.8) !important;
  input,
  textarea,
  .el-input__inner,
  .el-range-input,
  .el-select,
  textarea {
    width: 100%;
    height: 32px !important;
    background-color: rgba(mix(#000, $active, 70%), 0);
    border-color: $--color-info !important;
    // border-right: none;
    @extend .content;
    // @extend .color-white;
    &:focus-visible {
      border-color: $--color-primary !important;
    }
  }
  .el-cascader-node > .el-radio {
    width: 14px;
  }
}
//复写dropdown
.el-dropdown-menu.el-popper {
  $bg-color: rgba(mix(#000, $active, 70%), 0.8) !important;
  background-color: $bg-color;
  & > li {
    @extend .color-white;
  }
  border-color: $--color-primary !important;
  @extend .scrollbar-white-slinder;
}
.widget-dialog.is-fullscreen {
  max-height: 100%;
  .el-dialog__body {
    margin: 20px 25px 10px 16px !important;
  }
}
.el-dialog__wrapper {
  overflow: hidden;
  max-height: 100vh;
}
//复写dialog
.widget-dialog {
  max-height: 100vh;
  display: flex;
  position: relative;
  @extend .flex-column;
  .el-date-editor,
  .el-cascader {
    width: 100%;
  }
  .el-dialog__header {
    padding: 12px !important;
    display: flex;
    position: relative;
    align-items: center;
    flex-shrink: 0;
    @extend .no-select;
    border-bottom: 1px solid $--color-info;
    // background-color: mix($--color-primary, $--color-primary, 40%);
    background-color: $active;
    .el-dialog__title {
      @extend .title-2;
      @extend .color-white;
    }
    .el-dialog__headerbtn .el-dialog__close {
      @extend .title-2;
      @extend .color-white;
    }
    .el-dialog__headerbtn {
      @extend .position-rt;
      margin: 12px;
    }
  }
  .el-dialog__body {
    padding: 12px !important;
    padding-right: 16px !important;
    flex-shrink: 1;
    overflow-y: auto;
    @extend .color-white;
    @extend .scrollbar-white-slinder;
    &:hover {
      padding-right: 12px !important;
    }
    .el-form-item__content {
      color: #606266;
    }
  }
  .el-dialog__footer {
    padding: 12px;
  }
  .top-bar-sticky,
  .pagination-containe {
    background-color: $background-black !important;
  }
}
// ui-bg
.dalog-ui {
  background: url("~@/assets/images/dalog.png") no-repeat;
  background-size: 100% 100%;
  .el-dialog__header {
    padding: 50px !important;
    background-color: transparent;
    border-bottom: none;
    .el-dialog__title {
      @extend .absolute;
      left: 50%;
      transform: translateX(-50%);
      top: 65px;
      padding-bottom: 20px;
      // border-bottom:1px solid #6f8deb;
    }
    .el-dialog__headerbtn {
      opacity: 0;
      padding: 10px 15px;
      margin: 0;
    }
  }
  .el-dialog__body {
    margin: 10px 25px 10px 16px !important;
  }
  .el-dialog__footer {
    padding-top: 0;
    margin: 0 25px 50px 16px;
    padding-right: 16px;
  }
}
// tabs
.widget-tabs {
  .el-tabs__item {
    color: $--color-white;
  }
  .el-tabs__content {
    max-height: calc(100vh - 500px);
    &::-webkit-scrollbar {
      -webkit-appearance: none;
      width: 4px;
      border-radius: 5px;
      height: 10px;
      transition: background-color 1s;
      display: none;
    }
    &:hover {
      padding-right: 0px;
      &::-webkit-scrollbar {
        display: block;
      }
    }
    overflow-y: auto;
  }
  .el-tabs__item.is-active {
    color: $--color-white;
    background-color: $active;
  }
  .el-tabs__header {
    border-bottom: 1px solid $--color-primary !important;
    .el-tabs__nav {
      border-bottom: 1px solid $--color-primary !important;
    }
  }
}
// tree
.widget-tree {
  .el-tree {
    color: $--color-from-text;
    // max-height: calc(100% - 200px);
    // max-height: 100%;
    background: transparent;
    overflow: auto;
  }
  .el-tree-node__label {
    font-size: 18px;
  }
  .el-tree-node__content {
    height: 35px;
  }
  /*当鼠标点击tree的节点时显示的背景色,   字体颜色 */
  .el-tree-node:focus > .el-tree-node__content {
    background-color: $active-tree !important;
    color: #fff;
  }
  /**透明色*/
  .el-tree-node__content:hover .el-tree-node__expand-icon.is-leaf {
    color: transparent;
  }

  /*选中节点 icon图标的颜色*/
  .el-tree-node:focus > .el-tree-node__content .el-tree-node__expand-icon {
    color: #985;
  }

  /*当鼠标点击后,再点击空白地方,节点失去焦点时显示的背景色*/
  .el-tree--highlight-current
    .el-tree-node.is-current
    > .el-tree-node__content {
    background-color: $active-tree;
  }
  .el-tree-node {
    position: relative;
    padding-left: 0;
  }
  .el-tree-node__children {
    padding-left: 16px;
  }

  .el-tree-node :last-child:before {
    height: 40px;
  }

  .el-tree-node:before {
    border-left: none;
  }

  .el-tree-node:after {
    border-top: none;
  }

  .el-tree-node:before {
    content: "";
    left: -4px;
    position: absolute;
    right: auto;
    border-width: 1px;
    border-left: 1px dashed rgb(53, 255, 255);
    bottom: 0px;
    height: 100%;
    top: -26px;
    width: 1px;
  }

  .el-tree-node:after {
    content: "";
    left: -4px;
    position: absolute;
    right: auto;
    border-width: 1px;
    border-top: 1px dashed rgb(53, 255, 255);
    height: 20px;
    top: 12px;
    width: 18px;
  }
  .el-tree-node__expand-icon.expanded {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  .el-icon-caret-right:before {
    content: "\e723";
    font-size: 18px;
    color: rgb(53, 255, 255);
    position: absolute;
    left: -20px;
    top: -12px;
  }
  .el-tree-node__expand-icon.expanded.el-icon-caret-right:before {
    content: "\e722";
    font-size: 18px;
    color: rgb(53, 255, 255);
    position: absolute;
    left: -20px;
    top: -12px;
  }
  .el-tree-node__expand-icon.is-leaf:before {
    content: "\e722";
    font-size: 18px;
    color: rgb(53, 255, 255);
    position: absolute;
    left: -20px;
    top: -12px;
  }
  /*当鼠标移动时,节点显示的背景色*/
  .el-tree-node__content:hover {
  }
  .el-tree-node__content {
    padding-left: 30px !important;
    &:hover {
      background-color: $active-tree;
      .el-tree-node__expand-icon.is-leaf:before,
      .el-tree-node__expand-icon.expanded.el-icon-caret-right:before,
      .el-icon-caret-right:before,
      .el-tree-node:after {
        color: $--color-white;
      }
    }
  }
  .el-tree-node__content > .el-tree-node__expand-icon {
    padding: 0;
  }
}
.widget-form {
  .el-form-item__label {
    color: $--color-from-text;
    font-weight: 600;
  }
  .el-select,
  .el-input-number,
  .el-date-editor {
    width: 100%;
  }
  textarea {
    width: 100%;
    background-color: rgba(mix(#000, $active, 70%), 0);
    border-color: $--color-info !important;
    // font-size: 16px;
    padding: 4px 15px;
    &:focus-visible {
      border-color: $--color-primary !important;
    }
  }
}
.widget-form-white {
  .el-form-item__label {
    color: $--color-info;
    font-weight: 600;
  }
  .el-input__inner,
  .el-select,
  .el-input-number,
  .el-date-editor {
    width: 100%;
    color: $--color-white;
  }
  textarea {
    width: 100%;
    background-color: rgba(mix(#000, $active, 70%), 0);
    border-color: $--color-info !important;
    font-size: 16px;
    padding: 4px 15px;
    color: $--color-white;
    &:focus-visible {
      border-color: $--color-primary !important;
    }
  }
}
.widget-form-dashboard {
  .el-form-item__label {
    color: $--color-white;
    font-weight: 600;
  }
  .el-select,
  .el-cascader {
    width: 100%;
  }
  textarea {
    width: 100%;
    background-color: rgba(mix(#000, $active, 70%), 0);
    border-color: $--color-info !important;
    font-size: 16px;
    padding: 4px;
    &:focus-visible {
      border-color: $--color-primary !important;
    }
  }
}

.widget-dialog-poi {
  position: absolute;
  bottom: 35px !important;
  width: 500px !important;
  transform: translateX(-50%) translateY(0%);
  top: auto;
}
.widget-date {
  @extend .no-radius;
  $bg-color: rgba(mix(#000, $active, 70%), 0.8) !important;
  background-color: $bg-color;
  border-color: $--color-primary !important;
  border-right: none;
  @extend .content;
  color: white !important;
  input {
    color: white !important;
    background-color: rgba(0, 0, 0, 0) !important;
  }
}

.el-table__fixed-body-wrapper {
  //   top: 71px !important;
}
//
.el-table thead {
  color: $--color-from-text;
  tr {
    background-color: $--color-table-thead !important;
  }
}
.el-table,
.is-leaf {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

.el-table tr {
  background-color: rgba(255, 255, 255, 1) !important;
}
tr.el-table__row:hover {
  background-color: rgba(0, 0, 0, 0.1) !important;
}
.el-table__body tr:hover > td {
  background-color: rgba(255, 255, 255, 0.2) !important;
}
.el-table .el-table__body tr.current-row > td {
  background-color: rgba(179, 223, 255, 0.3) !important;
}
.widget-table {
  .el-table {
    color: $--color-white !important;
    thead {
      color: $--color-white !important;
      background: $active;
    }
    tr,
    th {
      background: none !important;
    }
  }

  .el-table__expanded-cell {
    background-color: rgba(0, 0, 0, 0.5);
  }
  .el-table__expand-icon {
    @extend .color-white;
  }
  .el-table__body-wrapper::-webkit-scrollbar {
    width: 8px; /*滚动条宽度*/
    height: 8px; /*滚动条高度*/
  }
  .el-table__body-wrapper::-webkit-scrollbar-track {
    border-radius: 10px; /*滚动条的背景区域的圆角*/
    -webkit-box-shadow: inset 0 0 6px $active;
    background-color: rgba(
      mix(#000, $active, 70%),
      0.8
    ) !important; /*滚动条的背景颜色*/
  }
  .el-table__body-wrapper::-webkit-scrollbar-thumb {
    border-radius: 10px; /*滚动条的圆角*/
    -webkit-box-shadow: inset 0 0 6px rgba(145, 143, 0143, 0.3);
    background-color: rgb(145, 143, 143); /*滚动条的背景颜色*/
  }
}
.el-pagination {
  //   filter: invert(1);
  .el-pager li {
    background: rgba(0, 0, 0, 0);
  }
}

.el-dropdown-menu.el-popper {
  max-height: 200px;
  overflow-y: scroll;
}
.is-disabled > * {
  color: #ccc !important;
}

//上传图片浏览
.el-upload-list__item {
  //   width: 64px !important;
  //   height: 64px !important;
}

.static {
  .amap-marker {
    transition: all 1s;
  }
}
.amap-control.amap-maptype {
  right: 20px !important;
  top: calc(100% - 150px) !important;
}

//时间选择器
body {
  // 时间选择整体,选择下拉
  .el-picker-panel,
  .el-picker-panel__footer {
    background: rgba(34, 49, 90, 0.8) no-repeat !important;
    color: #00c9f7 !important;
    border-color: #00c9f7 !important;
  }
  //时间选择内容头部
  .el-date-picker__header--bordered {
    border-bottom: 1px solid #00c9f7 !important;
  }
  // 左右箭头
  .el-picker-panel__icon-btn,
  .el-date-picker__header-label {
    color: #00c9f7 !important;
  }
  //年，月
  .el-year-table td .cell,
  .el-month-table td .cell {
    color: #00c9f7;
    font-size: 14px;
  }
  //年月选中/滑过样式
  .el-year-table td .cell:hover,
  .el-year-table td.current:not(.disabled) .cell,
  .el-year-table td.today .cell,
  .el-month-table td .cell:hover,
  .el-month-table td.current:not(.disabled) .cell,
  .el-month-table td.today .cell {
    color: #fff !important;
    background-color: #01ccff !important;
    border-radius: 4px !important;
    font-size: 15px !important;
    width: 60px;
    text-align: center;
  }
  .el-date-table th {
    color: $--color-info;
  }
  .el-date-table td.in-range div {
    background: rgba(1, 176, 242, 0.5);
  }
}

.el-form-item--mini .el-form-item__content {
  line-height: 20px !important;
}

.my-el-cell-group {
  .el-collapse-item__header,
  .el-collapse-item__wrap {
    @extend .color-white;
    background-color: none !important;
  }
}
